3.9.94 \(\int \frac {x^2}{a-b x^2+c x^4} \, dx\) [894]

Optimal. Leaf size=150 \[ \frac {\sqrt {b-\sqrt {b^2-4 a c}} \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {b-\sqrt {b^2-4 a c}}}\right )}{\sqrt {2} \sqrt {c} \sqrt {b^2-4 a c}}-\frac {\sqrt {b+\sqrt {b^2-4 a c}} \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {b+\sqrt {b^2-4 a c}}}\right )}{\sqrt {2} \sqrt {c} \sqrt {b^2-4 a c}} \]

[Out]

1/2*arctanh(x*2^(1/2)*c^(1/2)/(b-(-4*a*c+b^2)^(1/2))^(1/2))*(b-(-4*a*c+b^2)^(1/2))^(1/2)*2^(1/2)/c^(1/2)/(-4*a
*c+b^2)^(1/2)-1/2*arctanh(x*2^(1/2)*c^(1/2)/(b+(-4*a*c+b^2)^(1/2))^(1/2))*(b+(-4*a*c+b^2)^(1/2))^(1/2)*2^(1/2)
/c^(1/2)/(-4*a*c+b^2)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.07, antiderivative size = 150, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {1144, 214} \begin {gather*} \frac {\sqrt {b-\sqrt {b^2-4 a c}} \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {b-\sqrt {b^2-4 a c}}}\right )}{\sqrt {2} \sqrt {c} \sqrt {b^2-4 a c}}-\frac {\sqrt {\sqrt {b^2-4 a c}+b} \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {\sqrt {b^2-4 a c}+b}}\right )}{\sqrt {2} \sqrt {c} \sqrt {b^2-4 a c}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^2/(a - b*x^2 + c*x^4),x]

[Out]

(Sqrt[b - Sqrt[b^2 - 4*a*c]]*ArcTanh[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b - Sqrt[b^2 - 4*a*c]]])/(Sqrt[2]*Sqrt[c]*Sqrt[b
^2 - 4*a*c]) - (Sqrt[b + Sqrt[b^2 - 4*a*c]]*ArcTanh[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a*c]]])/(Sqrt[2]
*Sqrt[c]*Sqrt[b^2 - 4*a*c])

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 1144

Int[((d_.)*(x_))^(m_)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[(
d^2/2)*(b/q + 1), Int[(d*x)^(m - 2)/(b/2 + q/2 + c*x^2), x], x] - Dist[(d^2/2)*(b/q - 1), Int[(d*x)^(m - 2)/(b
/2 - q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d}, x] && NeQ[b^2 - 4*a*c, 0] && GeQ[m, 2]

Rubi steps

\begin {align*} \int \frac {x^2}{a-b x^2+c x^4} \, dx &=-\left (\frac {1}{2} \left (-1-\frac {b}{\sqrt {b^2-4 a c}}\right ) \int \frac {1}{-\frac {b}{2}-\frac {1}{2} \sqrt {b^2-4 a c}+c x^2} \, dx\right )+\frac {1}{2} \left (1-\frac {b}{\sqrt {b^2-4 a c}}\right ) \int \frac {1}{-\frac {b}{2}+\frac {1}{2} \sqrt {b^2-4 a c}+c x^2} \, dx\\ &=\frac {\sqrt {b-\sqrt {b^2-4 a c}} \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {b-\sqrt {b^2-4 a c}}}\right )}{\sqrt {2} \sqrt {c} \sqrt {b^2-4 a c}}-\frac {\sqrt {b+\sqrt {b^2-4 a c}} \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {b+\sqrt {b^2-4 a c}}}\right )}{\sqrt {2} \sqrt {c} \sqrt {b^2-4 a c}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.07, size = 137, normalized size = 0.91 \begin {gather*} \frac {-\sqrt {-b-\sqrt {b^2-4 a c}} \tan ^{-1}\left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {-b-\sqrt {b^2-4 a c}}}\right )+\sqrt {-b+\sqrt {b^2-4 a c}} \tan ^{-1}\left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {-b+\sqrt {b^2-4 a c}}}\right )}{\sqrt {2} \sqrt {c} \sqrt {b^2-4 a c}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^2/(a - b*x^2 + c*x^4),x]

[Out]

(-(Sqrt[-b - Sqrt[b^2 - 4*a*c]]*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[-b - Sqrt[b^2 - 4*a*c]]]) + Sqrt[-b + Sqrt[b^2
 - 4*a*c]]*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[-b + Sqrt[b^2 - 4*a*c]]])/(Sqrt[2]*Sqrt[c]*Sqrt[b^2 - 4*a*c])

________________________________________________________________________________________

Maple [A]
time = 0.03, size = 149, normalized size = 0.99

method result size
risch \(\frac {\left (\munderset {\textit {\_R} =\RootOf \left (c \,\textit {\_Z}^{4}-\textit {\_Z}^{2} b +a \right )}{\sum }\frac {\textit {\_R}^{2} \ln \left (x -\textit {\_R} \right )}{2 \textit {\_R}^{3} c -\textit {\_R} b}\right )}{2}\) \(43\)
default \(4 c \left (-\frac {\left (b +\sqrt {-4 a c +b^{2}}\right ) \sqrt {2}\, \arctanh \left (\frac {c x \sqrt {2}}{\sqrt {\left (b +\sqrt {-4 a c +b^{2}}\right ) c}}\right )}{8 c \sqrt {-4 a c +b^{2}}\, \sqrt {\left (b +\sqrt {-4 a c +b^{2}}\right ) c}}+\frac {\left (-b +\sqrt {-4 a c +b^{2}}\right ) \sqrt {2}\, \arctan \left (\frac {c x \sqrt {2}}{\sqrt {\left (-b +\sqrt {-4 a c +b^{2}}\right ) c}}\right )}{8 \sqrt {-4 a c +b^{2}}\, c \sqrt {\left (-b +\sqrt {-4 a c +b^{2}}\right ) c}}\right )\) \(149\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2/(c*x^4-b*x^2+a),x,method=_RETURNVERBOSE)

[Out]

4*c*(-1/8*(b+(-4*a*c+b^2)^(1/2))/c/(-4*a*c+b^2)^(1/2)*2^(1/2)/((b+(-4*a*c+b^2)^(1/2))*c)^(1/2)*arctanh(c*x*2^(
1/2)/((b+(-4*a*c+b^2)^(1/2))*c)^(1/2))+1/8/(-4*a*c+b^2)^(1/2)/c*(-b+(-4*a*c+b^2)^(1/2))*2^(1/2)/((-b+(-4*a*c+b
^2)^(1/2))*c)^(1/2)*arctan(c*x*2^(1/2)/((-b+(-4*a*c+b^2)^(1/2))*c)^(1/2)))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2/(c*x^4-b*x^2+a),x, algorithm="maxima")

[Out]

integrate(x^2/(c*x^4 - b*x^2 + a), x)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 551 vs. \(2 (115) = 230\).
time = 0.38, size = 551, normalized size = 3.67 \begin {gather*} -\frac {1}{2} \, \sqrt {\frac {1}{2}} \sqrt {\frac {b + \frac {b^{2} c - 4 \, a c^{2}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}}}{b^{2} c - 4 \, a c^{2}}} \log \left (\frac {\sqrt {\frac {1}{2}} {\left (b^{2} c - 4 \, a c^{2}\right )} \sqrt {\frac {b + \frac {b^{2} c - 4 \, a c^{2}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}}}{b^{2} c - 4 \, a c^{2}}}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}} + x\right ) + \frac {1}{2} \, \sqrt {\frac {1}{2}} \sqrt {\frac {b + \frac {b^{2} c - 4 \, a c^{2}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}}}{b^{2} c - 4 \, a c^{2}}} \log \left (-\frac {\sqrt {\frac {1}{2}} {\left (b^{2} c - 4 \, a c^{2}\right )} \sqrt {\frac {b + \frac {b^{2} c - 4 \, a c^{2}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}}}{b^{2} c - 4 \, a c^{2}}}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}} + x\right ) + \frac {1}{2} \, \sqrt {\frac {1}{2}} \sqrt {\frac {b - \frac {b^{2} c - 4 \, a c^{2}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}}}{b^{2} c - 4 \, a c^{2}}} \log \left (\frac {\sqrt {\frac {1}{2}} {\left (b^{2} c - 4 \, a c^{2}\right )} \sqrt {\frac {b - \frac {b^{2} c - 4 \, a c^{2}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}}}{b^{2} c - 4 \, a c^{2}}}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}} + x\right ) - \frac {1}{2} \, \sqrt {\frac {1}{2}} \sqrt {\frac {b - \frac {b^{2} c - 4 \, a c^{2}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}}}{b^{2} c - 4 \, a c^{2}}} \log \left (-\frac {\sqrt {\frac {1}{2}} {\left (b^{2} c - 4 \, a c^{2}\right )} \sqrt {\frac {b - \frac {b^{2} c - 4 \, a c^{2}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}}}{b^{2} c - 4 \, a c^{2}}}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}} + x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2/(c*x^4-b*x^2+a),x, algorithm="fricas")

[Out]

-1/2*sqrt(1/2)*sqrt((b + (b^2*c - 4*a*c^2)/sqrt(b^2*c^2 - 4*a*c^3))/(b^2*c - 4*a*c^2))*log(sqrt(1/2)*(b^2*c -
4*a*c^2)*sqrt((b + (b^2*c - 4*a*c^2)/sqrt(b^2*c^2 - 4*a*c^3))/(b^2*c - 4*a*c^2))/sqrt(b^2*c^2 - 4*a*c^3) + x)
+ 1/2*sqrt(1/2)*sqrt((b + (b^2*c - 4*a*c^2)/sqrt(b^2*c^2 - 4*a*c^3))/(b^2*c - 4*a*c^2))*log(-sqrt(1/2)*(b^2*c
- 4*a*c^2)*sqrt((b + (b^2*c - 4*a*c^2)/sqrt(b^2*c^2 - 4*a*c^3))/(b^2*c - 4*a*c^2))/sqrt(b^2*c^2 - 4*a*c^3) + x
) + 1/2*sqrt(1/2)*sqrt((b - (b^2*c - 4*a*c^2)/sqrt(b^2*c^2 - 4*a*c^3))/(b^2*c - 4*a*c^2))*log(sqrt(1/2)*(b^2*c
 - 4*a*c^2)*sqrt((b - (b^2*c - 4*a*c^2)/sqrt(b^2*c^2 - 4*a*c^3))/(b^2*c - 4*a*c^2))/sqrt(b^2*c^2 - 4*a*c^3) +
x) - 1/2*sqrt(1/2)*sqrt((b - (b^2*c - 4*a*c^2)/sqrt(b^2*c^2 - 4*a*c^3))/(b^2*c - 4*a*c^2))*log(-sqrt(1/2)*(b^2
*c - 4*a*c^2)*sqrt((b - (b^2*c - 4*a*c^2)/sqrt(b^2*c^2 - 4*a*c^3))/(b^2*c - 4*a*c^2))/sqrt(b^2*c^2 - 4*a*c^3)
+ x)

________________________________________________________________________________________

Sympy [A]
time = 0.43, size = 75, normalized size = 0.50 \begin {gather*} \operatorname {RootSum} {\left (t^{4} \cdot \left (256 a^{2} c^{3} - 128 a b^{2} c^{2} + 16 b^{4} c\right ) + t^{2} \cdot \left (16 a b c - 4 b^{3}\right ) + a, \left ( t \mapsto t \log {\left (64 t^{3} a c^{2} - 16 t^{3} b^{2} c + 2 t b + x \right )} \right )\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2/(c*x**4-b*x**2+a),x)

[Out]

RootSum(_t**4*(256*a**2*c**3 - 128*a*b**2*c**2 + 16*b**4*c) + _t**2*(16*a*b*c - 4*b**3) + a, Lambda(_t, _t*log
(64*_t**3*a*c**2 - 16*_t**3*b**2*c + 2*_t*b + x)))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 513 vs. \(2 (115) = 230\).
time = 4.14, size = 513, normalized size = 3.42 \begin {gather*} \frac {{\left (2 \, b^{2} c^{2} - 8 \, a c^{3} - \sqrt {2} \sqrt {b^{2} - 4 \, a c} \sqrt {-b c - \sqrt {b^{2} - 4 \, a c} c} b^{2} + 4 \, \sqrt {2} \sqrt {b^{2} - 4 \, a c} \sqrt {-b c - \sqrt {b^{2} - 4 \, a c} c} a c - 2 \, \sqrt {2} \sqrt {b^{2} - 4 \, a c} \sqrt {-b c - \sqrt {b^{2} - 4 \, a c} c} b c - \sqrt {2} \sqrt {b^{2} - 4 \, a c} \sqrt {-b c - \sqrt {b^{2} - 4 \, a c} c} c^{2} - 2 \, {\left (b^{2} - 4 \, a c\right )} c^{2}\right )} \arctan \left (\frac {2 \, \sqrt {\frac {1}{2}} x}{\sqrt {-\frac {b + \sqrt {b^{2} - 4 \, a c}}{c}}}\right )}{2 \, {\left (b^{4} - 8 \, a b^{2} c + 2 \, b^{3} c + 16 \, a^{2} c^{2} - 8 \, a b c^{2} + b^{2} c^{2} - 4 \, a c^{3}\right )} {\left | c \right |}} - \frac {{\left (2 \, b^{2} c^{2} - 8 \, a c^{3} - \sqrt {2} \sqrt {b^{2} - 4 \, a c} \sqrt {-b c + \sqrt {b^{2} - 4 \, a c} c} b^{2} + 4 \, \sqrt {2} \sqrt {b^{2} - 4 \, a c} \sqrt {-b c + \sqrt {b^{2} - 4 \, a c} c} a c - 2 \, \sqrt {2} \sqrt {b^{2} - 4 \, a c} \sqrt {-b c + \sqrt {b^{2} - 4 \, a c} c} b c - \sqrt {2} \sqrt {b^{2} - 4 \, a c} \sqrt {-b c + \sqrt {b^{2} - 4 \, a c} c} c^{2} - 2 \, {\left (b^{2} - 4 \, a c\right )} c^{2}\right )} \arctan \left (\frac {2 \, \sqrt {\frac {1}{2}} x}{\sqrt {-\frac {b - \sqrt {b^{2} - 4 \, a c}}{c}}}\right )}{2 \, {\left (b^{4} - 8 \, a b^{2} c + 2 \, b^{3} c + 16 \, a^{2} c^{2} - 8 \, a b c^{2} + b^{2} c^{2} - 4 \, a c^{3}\right )} {\left | c \right |}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2/(c*x^4-b*x^2+a),x, algorithm="giac")

[Out]

1/2*(2*b^2*c^2 - 8*a*c^3 - sqrt(2)*sqrt(b^2 - 4*a*c)*sqrt(-b*c - sqrt(b^2 - 4*a*c)*c)*b^2 + 4*sqrt(2)*sqrt(b^2
 - 4*a*c)*sqrt(-b*c - sqrt(b^2 - 4*a*c)*c)*a*c - 2*sqrt(2)*sqrt(b^2 - 4*a*c)*sqrt(-b*c - sqrt(b^2 - 4*a*c)*c)*
b*c - sqrt(2)*sqrt(b^2 - 4*a*c)*sqrt(-b*c - sqrt(b^2 - 4*a*c)*c)*c^2 - 2*(b^2 - 4*a*c)*c^2)*arctan(2*sqrt(1/2)
*x/sqrt(-(b + sqrt(b^2 - 4*a*c))/c))/((b^4 - 8*a*b^2*c + 2*b^3*c + 16*a^2*c^2 - 8*a*b*c^2 + b^2*c^2 - 4*a*c^3)
*abs(c)) - 1/2*(2*b^2*c^2 - 8*a*c^3 - sqrt(2)*sqrt(b^2 - 4*a*c)*sqrt(-b*c + sqrt(b^2 - 4*a*c)*c)*b^2 + 4*sqrt(
2)*sqrt(b^2 - 4*a*c)*sqrt(-b*c + sqrt(b^2 - 4*a*c)*c)*a*c - 2*sqrt(2)*sqrt(b^2 - 4*a*c)*sqrt(-b*c + sqrt(b^2 -
 4*a*c)*c)*b*c - sqrt(2)*sqrt(b^2 - 4*a*c)*sqrt(-b*c + sqrt(b^2 - 4*a*c)*c)*c^2 - 2*(b^2 - 4*a*c)*c^2)*arctan(
2*sqrt(1/2)*x/sqrt(-(b - sqrt(b^2 - 4*a*c))/c))/((b^4 - 8*a*b^2*c + 2*b^3*c + 16*a^2*c^2 - 8*a*b*c^2 + b^2*c^2
 - 4*a*c^3)*abs(c))

________________________________________________________________________________________

Mupad [B]
time = 4.54, size = 416, normalized size = 2.77 \begin {gather*} -2\,\mathrm {atanh}\left (\frac {\left (x\,\left (4\,a\,c^2-2\,b^2\,c\right )+\frac {x\,\left (8\,b^3\,c^2-32\,a\,b\,c^3\right )\,\left (b^3+\sqrt {-{\left (4\,a\,c-b^2\right )}^3}-4\,a\,b\,c\right )}{8\,\left (16\,a^2\,c^3-8\,a\,b^2\,c^2+b^4\,c\right )}\right )\,\sqrt {\frac {b^3+\sqrt {-{\left (4\,a\,c-b^2\right )}^3}-4\,a\,b\,c}{8\,\left (16\,a^2\,c^3-8\,a\,b^2\,c^2+b^4\,c\right )}}}{a\,c}\right )\,\sqrt {\frac {b^3+\sqrt {-{\left (4\,a\,c-b^2\right )}^3}-4\,a\,b\,c}{8\,\left (16\,a^2\,c^3-8\,a\,b^2\,c^2+b^4\,c\right )}}-2\,\mathrm {atanh}\left (\frac {\left (x\,\left (4\,a\,c^2-2\,b^2\,c\right )-\frac {x\,\left (8\,b^3\,c^2-32\,a\,b\,c^3\right )\,\left (\sqrt {-{\left (4\,a\,c-b^2\right )}^3}-b^3+4\,a\,b\,c\right )}{8\,\left (16\,a^2\,c^3-8\,a\,b^2\,c^2+b^4\,c\right )}\right )\,\sqrt {-\frac {\sqrt {-{\left (4\,a\,c-b^2\right )}^3}-b^3+4\,a\,b\,c}{8\,\left (16\,a^2\,c^3-8\,a\,b^2\,c^2+b^4\,c\right )}}}{a\,c}\right )\,\sqrt {-\frac {\sqrt {-{\left (4\,a\,c-b^2\right )}^3}-b^3+4\,a\,b\,c}{8\,\left (16\,a^2\,c^3-8\,a\,b^2\,c^2+b^4\,c\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2/(a - b*x^2 + c*x^4),x)

[Out]

- 2*atanh(((x*(4*a*c^2 - 2*b^2*c) + (x*(8*b^3*c^2 - 32*a*b*c^3)*(b^3 + (-(4*a*c - b^2)^3)^(1/2) - 4*a*b*c))/(8
*(b^4*c + 16*a^2*c^3 - 8*a*b^2*c^2)))*((b^3 + (-(4*a*c - b^2)^3)^(1/2) - 4*a*b*c)/(8*(b^4*c + 16*a^2*c^3 - 8*a
*b^2*c^2)))^(1/2))/(a*c))*((b^3 + (-(4*a*c - b^2)^3)^(1/2) - 4*a*b*c)/(8*(b^4*c + 16*a^2*c^3 - 8*a*b^2*c^2)))^
(1/2) - 2*atanh(((x*(4*a*c^2 - 2*b^2*c) - (x*(8*b^3*c^2 - 32*a*b*c^3)*((-(4*a*c - b^2)^3)^(1/2) - b^3 + 4*a*b*
c))/(8*(b^4*c + 16*a^2*c^3 - 8*a*b^2*c^2)))*(-((-(4*a*c - b^2)^3)^(1/2) - b^3 + 4*a*b*c)/(8*(b^4*c + 16*a^2*c^
3 - 8*a*b^2*c^2)))^(1/2))/(a*c))*(-((-(4*a*c - b^2)^3)^(1/2) - b^3 + 4*a*b*c)/(8*(b^4*c + 16*a^2*c^3 - 8*a*b^2
*c^2)))^(1/2)

________________________________________________________________________________________